package com.bibrApp.difu.actvity.huankuan_mvp;


import android.graphics.Color;
import android.view.View;
import android.widget.TextView;

import com.bibrApp.difu.R;
import com.bibrApp.difu.Response.RePayInfoResBody;
import com.bibrApp.difu.base.BaseActivity;

import butterknife.BindView;
import butterknife.OnClick;

public class HuanKuanActivity extends BaseActivity<HuankuanPresenter> implements IHuankuanView {


    @BindView(R.id.tv_item_1)
    TextView tvItem1;
    @BindView(R.id.tv_item_2)
    TextView tvItem2;
    @BindView(R.id.tv_item_3)
    TextView tvItem3;

    @Override
    protected void initPresenter() {
        presenter = new HuankuanPresenter(this, this);
        presenter.init();
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_huan_kuan;
    }

    @Override
    public void error(String msg) {

    }

    @Override
    public void successOfGetRepayInfo(RePayInfoResBody rePayInfoResBody) {

    }

    @Override
    public void initView() {

    }

    @OnClick(R.id.bt_back)
    public void backClick() {
        finish();
    }

    @OnClick({R.id.tv_item_3, R.id.tv_item_2, R.id.tv_item_1})
    public void itemClick(View v) {

        tvItem1.setBackgroundResource(v.getId() == R.id.tv_item_1 ? R.drawable.bg_blue_2 : R.color.transparent);
        tvItem2.setBackgroundResource(v.getId() == R.id.tv_item_2 ? R.drawable.bg_blue_2 : R.color.transparent);
        tvItem3.setBackgroundResource(v.getId() == R.id.tv_item_3 ? R.drawable.bg_blue_2 : R.color.transparent);
        tvItem1.setTextColor(v.getId() == R.id.tv_item_1 ? Color.WHITE : Color.parseColor("#333333"));
        tvItem2.setTextColor(v.getId() == R.id.tv_item_2 ? Color.WHITE : Color.parseColor("#333333"));
        tvItem3.setTextColor(v.getId() == R.id.tv_item_3 ? Color.WHITE : Color.parseColor("#333333"));
    }
}
